package com.mvetc.service;

import java.util.List;
import java.util.Map;

import com.mvetc.entity.Movie;
import com.mvetc.entity.PageInfo;

public interface MovieService {

	/**
	 * @author linshiqing
	 * @param map
	 * @return List<Movie>
	 */
	PageInfo<Movie> getBy(Map<String, String> map);
	
	/**
	 * @author linshiqing
	 * @param movie
	 * @return
	 */
	int add(Movie movie);
	
	/**
	 * @author linshiqing
	 * @param movieId
	 * @return
	 */
	int deleteById(String movieId);
	
	/**
	 * @author linshiqing
	 * @param movie
	 * @return
	 */
	int modify(Movie movie);
	
	/**
	 * 根据条件获取电影信息
	 * @author SunZhiQiang
	 * @param showColumnsName
	 * @param selectColumnsName
	 * @param tableNames
	 * @param joinColumnsName
	 * @return
	 */
	List<Map<String, Object>> getMoviesInfo(String...where);
	
	/**
	 * 根据电影id获取评论信息和用户信息
	 * @author SunZhiQiang
	 * @param movieId
	 * @return 
	 */
	List<Map<String, Object>> getCommentsByMovieId(String movieId);
	
	/**
	 * 查询用户信息
	 * @author SunZhiQiang
	 * @param movieId
	 * @return 
	 */
	List<Map<String, Object>> getUserInfoByName(String userName);
	
	/**
	 * 添加评论信息
	 * @author SunZhiQiang
	 * @param movieId
	 * @return 
	 */
	int addComment(String commentContent,String datetime,String userId,String movieId);
	
	/**
	 * 删除评论信息
	 * @author SunZhiQiang
	 * @param movieId
	 * @return 
	 */
	int deleteComment(String commentContent,String datetime,String userId,String movieId);
	
	/**
	 * 更新用户信息
	 * @author SunZhiQiang
	 * @param tableName
	 * @param set
	 * @param where
	 * @return
	 */
	int updateInfo(Map<String, String> set, Map<String, String> where);
	
	
	/**
	 * 收藏电影
	 * @param userId
	 * @param collectMovieId
	 * @return
	 */
	int addCollect(String userId, String collectMovieId);
	
	/**
	 * 获取收藏列表
	 * @param userId
	 * @param collectMovieId
	 * @return
	 */
	List<Map<String, Object>> getCollect(String userId, String collectMovieId);
	
	/**
	 * 取消收藏电影
	 * @param userId
	 * @param collectMovieId
	 * @return
	 */
	int deleteCollect(String userId, String collectMovieId);
	
	
}
